<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // break语句用于跳出循环
        // continue语句用于立即终止本次循环，并返回头部开始下一轮循环
        let index = 0;
        while (index <= 20) {
            console.log(index);
            index++;
            if (index === 10) {
                break;
            }
        }
        for (var num = 0; num <= 100; num++) {
            if (num === 10 || num == 20) {
                continue;

            }
            console.log(num);


        }
    </script>
</body>

</html>